<!--组件-二级菜单-->
<template>

  <div class="bg">
    <div class="but"  v-for="(name, index) in menus" v-bind:key="index"  @click="menuClick(index)">
      <text :class="['text', 'font32', menu == index ? 'text1' : 'text3']">{{name}}</text>
      <div :class="['line', menu == index ? 'main1' : '']" @click="menuClick(index)"></div>
    </div>
  </div>
</template>

<script>

export default {
  props:{
    menu: Object,
    menus: Array,
  },
  
  data() {
    return {
    };
  },

  mounted(){
    
  },

  methods:{

    /********************************** 点击触发*/
    menuClick(index){
      this.$emit("menuClick",index);
    },
  }
}
</script>


<style src="@/_css/style.css"></style>
<style scoped>
.bg {
  flex-direction: row;

  padding-left: 20px;
  padding-right: 20px;
  padding-top: 20px;
}
.but {
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding-left: 20px;
  padding-right: 20px;
}
.text {
  lines:1;
  text-overflow: ellipsis;
}
.line {
  width: 80px;
  height: 6px;
  border-radius: 3px;

  margin-top: 20px;
}
</style>
